{% load i18n %}

{% if is_paginated %}
  <div class="pagination">
    <ul class="nav-pagination" role="navigation">
      {% if page_obj.has_previous %}
        <li><a rel="prev" class="previous" href="?page={{ page_obj.previous_page_number }}">
          <i class="icon icon-chevron-left"></i>
          <span class="visuallyhidden">{% translate "Previous" context "pagination" %}</span>
        </a></li>
      {% endif %}
      <span class="page-current">
        {% blocktranslate trimmed with page_num=page_obj.number pages=page_obj.paginator.num_pages %}
          Page {{ page_num }} of {{ pages }}
        {% endblocktranslate %}
      </span>
      {% if page_obj.has_next %}
        <li><a rel="next" class="next" href="?page={{ page_obj.next_page_number }}">
          <i class="icon icon-chevron-right"></i>
          <span class="visuallyhidden">{% translate "Next" context "pagination" %}</span>
        </a></li>
      {% endif %}
    </ul>
  </div>
{% endif %}
